package algotithm.weekendrace.leetcode227.test2;

import java.util.Arrays;

/**
 * @author zhouyanxiang
 * @Date 2021-02-2021/2/7-12:29
 */
public class Solution {

    public static void main(String[] args) {
        Solution solution = new Solution();
        int a = 2, b = 4,c = 6;
        int maximumScore = solution.maximumScore(a, b, c);
        System.out.println(maximumScore);
    }

    public int maximumScore(int a, int b, int c) {
        int[] nums = new int[]{a, b, c};
        Arrays.sort(nums);
        int upper = (a + b + c) / 2;
        return Math.min(nums[0] + nums[1], upper);
    }

}
